package com.itheima.controller;


import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice


public class ProjectExceptionAdvice {


    @ExceptionHandler(Exception.class)
    public Result Exception(Exception e) {
        System.out.println(e.getMessage());
        return new Result(Code.SYSTEM_ERR, e.getMessage(), e);
    }



}
